package com.heima.wemedia.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.wemedia.pojos.WmNewsMaterial;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@SuppressWarnings("ALL")
@Mapper
public interface WmNewsMaterialMapper extends BaseMapper<WmNewsMaterial> {
    /**
     * 用来批量添加数据，用于素材与文章关系做关联
     */
    void saveRelations(@Param("materials") List<Integer> materials,
                                @Param("newsId") Integer newId,
                                @Param("type") int type);
}